package org.oa.dao.impl;

import java.io.Serializable;

import javax.annotation.Resource;

import org.hibernate.Session;
import org.hibernate.SessionFactory;
import org.oa.dao.UserDao;
import org.oa.dao.UserDataDao;
import org.oa.dto.User;
import org.oa.dto.UserData;
import org.springframework.orm.hibernate5.support.HibernateDaoSupport;
import org.springframework.stereotype.Repository;
/**
 * 用户详细数据处理Dao
 *
 */
@Repository
public class UserDataDaoImpl extends HibernateDaoSupport implements UserDataDao{

	@Resource
	public void MySessionFactory(SessionFactory sessionFactory){
		super.setSessionFactory(sessionFactory);
	}
	
	public Long save(UserData userData) {
		Session session = currentSession();
		Serializable id = session.save(userData);
		return (Long)id;
	}
}
